home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1992 October
/
1992-10.d64
/
labasic demo
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
3KB
|
133 lines
10 ifla=0thenla=49152:print"[147]loading la basic and demo":load"la basic",8,1
20 sysla,0
30 sysla,2,"title"
40 sysla,2,"initialize
50 [158]la,2,"draw screen"
60 :
70 [143]=get options
80 [151]198,0:[146]198,1:[161]a$
90 [139]a$[179]"1"[176]a$[177]"4"[167][158]la,1,"get options"
100 a[178][197](a$):[158]la,2,op$(a)
110 [158]la,1,"get options
120 :
130 :
140 :
150 rem=press any key
160 sysla,4(22,9:print"press any key to go on"
170 poke198,0:wait198,1:return
180 :
190 :
200 :
210 rem=draw screen
220 poke53281,cs:poke53280,cb
230 sysla,3(5,5,cc:print"choose an option
240 [158]la,5,"data for screen
250 rem=ds loop
260 read x,y,a$
270 ifx=-1thensysla,1,"ds done"
280 sysla,4(x,y:printa$
290 sysla,1,"ds loop
300 [143]=ds done
310 [142]
320 :
330 [143]=data for screen
340 [131] 7,7,"1.zodiac
350 data 8,7,"2.change background color
360 [131] 9,7,"3.change border color
370 data10,7,"4.change text color
380 [131]-1,-1,-1
390 :
400 :
410 :
420 [143]=initialize
430 cc[178]101:[143] character color
440 cb[178]0 :[143] borer color
450 cs[178]0 :[143] screen color
460 [158]la,5,"data for initialization
470 fora=1to4:readop$(a):next
480 fora=1to40:sp$=sp$+" ":next:sp$=sp$+"[145][145]"
490 return
500 :
510 rem=data for initialization
520 data "zodiac
530 [131] "background color
540 data "border color
550 [131] "text color
560 :
570 :
580 rem=background color
590 cb=cb+1:ifcb>255thencb=0
600 poke53281,cb
610 return
620 :
630 :
640 :
650 rem=border color
660 cs=cs+1:ifcb>255 thencb=0
670 poke53280,cs
680 return
690 :
700 :
710 :
720 rem=text color
730 cc=cc+1:if cc>116thencc=100
740 sysla,4(0,0,cc
750 return
760 :
770 :
780 :
790 rem=zodiac
800 poke53280,0:poke53281,0
810 sysla,3(5,14,2:print"the zodiac
820 [158]la,4(9,2,1:[153]"in which month were you born (1-12) ?
830 sysla,4(10,1,2:printsp$:inputmo$:mo=val(mo$)
840 ifmo<1ormo>12then830
850 sysla,4(12,2,1:print"on what date ?
860 [158]la,4(13,1,2:[153]sp$ :[133]da$:da[178][197](da$)
870 [139]da[179]1[176]da[177]31[167]860
880 [139]da[179]10 [167]da$[178]"0"[170]da$
890 zz$[178]mo$[170]"."[170]da$:zz[178][197](zz$)
900 [139]zz[177]12.20 [167]zz[178]zz[171]13
910 [158]la,5,"dates of zodiac"
920 zc[178]0
930 zc[178]zc[170]1:[135] a:[139]zz[177]a[167]930
940 [158]la,5,"stars of zodiac"
950 [129]a[178]1[164]zc:[135] zs$:[130]
960 [158]la,4(17,3,1:[153]"your zodiac sign is...."
970 [158]la,4(17,25,2:[153]zs$
980 [158]la,2,"press any key"
990 [158]la,2,"draw screen"
1000 [142]
1010 :
1020 [143]=dates of zodiac
1030 [131]1.19,2.18,3.20,4.20,5.20,6.20,7.20,8.21,9.22,10.22,11.22,12.20
1040 :
1050 [143]=stars of zodiac
1060 [131] "capricon","aquarius","pisces",aries,taurus,"gemini","cancer","leo"
1070 [131] "virgo","libra","scorpio","sagittarius"
1080 [142]
1090 :
1100 :
1110 :
1120 [143]=title
1130 [151]53280,0 :[151]53281,0:[158]la,3(0,12,1:[153]"l a b a s i c
1140 sysla,5,"data for title
1150 [143]=again
1160 [135] x,y,a$
1170 [139]x[178][171]1[167][158]la,1,"back
1180 sysla,4(x,y:printa$
1190 sysla,1,"again
1200 [143]=back
1210 [158]la,2,"press any key":[142]
1220 :
1230 [143]=data for title
1240 [131] 2,10 ,"a basic extension"
1250 [131]6,1,"that allows the use of labels in the"
1260 [131]7,1,"following statements:
1270 data10,3,"goto"
1280 data11,3,"gosub"
1290 data12,3,"restore"
1300 data15,1,"it also provides commands for
1310 [131]16,1,"cursor positioning & color setting
1320 data-1,-1,-1